package com.cracker.websocket.server.dao;

import com.cracker.websocket.server.entity.GroupEntity;
import com.cracker.websocket.server.entity.UserEntity;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

@Service
public class GroupDao {
    public GroupEntity getById(String id) {
        GroupEntity groupEntity = new GroupEntity();
        groupEntity.setId(id);
        groupEntity.setCreatedAt(new Date());
        return groupEntity;
    }

    public Set<UserEntity> listUserById(String id) {
        HashSet<UserEntity> userEntities = new HashSet<>();
        UserEntity userEntity = new UserEntity();
        userEntity.setId(1);
        userEntities.add(userEntity);
        return userEntities;
    }
}
